import ajax from './ajax'
import qs from 'qs'
const BASE = '/zhanwang'
const BASE2 = 'http://127.0.0.1:3000'
// 轮播图接口
export const reqHomepage = () => ajax(BASE + '/api/homepage')
// 推荐接口
export const reqPersonal = () => ajax(BASE + '/api/recommendation/personal')
// 精选接口
export const reqFeatured = () => ajax(BASE + '/api/recommendation/featured')
// 当下流行接口
export const reqTrending = () => ajax(BASE + '/api/recommendation/trending')
// 热门赠礼接口
export const reqGifted = () => ajax(BASE + '/api/recommendation/most-gifted')
// 详情页接口
export const reqProduct = (destination) => ajax(BASE + '/api/product/' + destination)
// 用户登录
export const reqLogin = (Login) => ajax(BASE2 + '/users/login', qs.stringify(Login), "POST")
// 用户注册
export const reqRegister = (Register) => ajax(BASE2 + '/users/register', qs.stringify(Register), "POST")